package com.hks360.car_treasure.model;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by xiaote on 2016/3/22.
 * 当前车辆的状态
 */
public class CarState extends BaseModel {

    /**
     * Engine : 0
     * HandBrake : 0
     * Brake : 1
     * Gear : 00
     * Lock : OnLock
     * Windows : 00000
     * ACC : 0
     * GPS : 0
     * Light : 0000
     * FrontDefrost : 0
     * RearDefrost : 0
     * ACState : 0
     * Ctmp : 0010
     * WindSpeed : 111
     * SeatHeating : 000
     * Sim : 000
     * Power : 00000000
     * InnerTmp : 00
     * ExternalTmp : 00
     * Mileage : 14
     * Date : 00000000
     * Time : 000000
     * Speed : 0000
     * Latitude : 00000000
     * Longitude : 00000000
     * Elevation : 00000000
     */

    private String Engine;
    private String HandBrake;
    private String Brake;
    private String Gear;
    private String Lock;
    private String Windows;
    private String ACC;
    private String GPS;
    private String Light;
    private String FrontDefrost;
    private String RearDefrost;
    private String ACState;
    private String Ctmp;
    private String WindSpeed;
    private String SeatHeating;
    private String Sim;
    private String Power;
    private String InnerTmp;
    private String ExternalTmp;
    private String Mileage;
    private String Date;
    private String Time;
    private String Speed;
    private String Latitude;
    private String Longitude;
    private String Elevation;
    private String LightAlert;

    public String getLightAlert() {
        return LightAlert;
    }

    public void setLightAlert(String lightAlert) {
        LightAlert = lightAlert;
    }

    public static CarState objectFromData(String str) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), CarState.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setEngine(String Engine) {
        this.Engine = Engine;
    }

    public void setHandBrake(String HandBrake) {
        this.HandBrake = HandBrake;
    }

    public void setBrake(String Brake) {
        this.Brake = Brake;
    }

    public void setGear(String Gear) {
        this.Gear = Gear;
    }

    public void setLock(String Lock) {
        this.Lock = Lock;
    }

    public void setWindows(String Windows) {
        this.Windows = Windows;
    }

    public void setACC(String ACC) {
        this.ACC = ACC;
    }

    public void setGPS(String GPS) {
        this.GPS = GPS;
    }

    public void setLight(String Light) {
        this.Light = Light;
    }

    public void setFrontDefrost(String FrontDefrost) {
        this.FrontDefrost = FrontDefrost;
    }

    public void setRearDefrost(String RearDefrost) {
        this.RearDefrost = RearDefrost;
    }

    public void setACState(String ACState) {
        this.ACState = ACState;
    }

    public void setCtmp(String Ctmp) {
        this.Ctmp = Ctmp;
    }

    public void setWindSpeed(String WindSpeed) {
        this.WindSpeed = WindSpeed;
    }

    public void setSeatHeating(String SeatHeating) {
        this.SeatHeating = SeatHeating;
    }

    public void setSim(String Sim) {
        this.Sim = Sim;
    }

    public void setPower(String Power) {
        this.Power = Power;
    }

    public void setInnerTmp(String InnerTmp) {
        this.InnerTmp = InnerTmp;
    }

    public void setExternalTmp(String ExternalTmp) {
        this.ExternalTmp = ExternalTmp;
    }

    public void setMileage(String Mileage) {
        this.Mileage = Mileage;
    }

    public void setDate(String Date) {
        this.Date = Date;
    }

    public void setTime(String Time) {
        this.Time = Time;
    }

    public void setSpeed(String Speed) {
        this.Speed = Speed;
    }

    public void setLatitude(String Latitude) {
        this.Latitude = Latitude;
    }

    public void setLongitude(String Longitude) {
        this.Longitude = Longitude;
    }

    public void setElevation(String Elevation) {
        this.Elevation = Elevation;
    }

    public String getEngine() {
        return Engine;
    }

    public String getHandBrake() {
        return HandBrake;
    }

    public String getBrake() {
        return Brake;
    }

    public String getGear() {
        return Gear;
    }

    public String getLock() {
        return Lock;
    }

    public String getWindows() {
        return Windows;
    }

    public String getACC() {
        return ACC;
    }

    public String getGPS() {
        return GPS;
    }

    public String getLight() {
        return Light;
    }

    public String getFrontDefrost() {
        return FrontDefrost;
    }

    public String getRearDefrost() {
        return RearDefrost;
    }

    public String getACState() {
        return ACState;
    }

    public String getCtmp() {
        return Ctmp;
    }

    public String getWindSpeed() {
        return WindSpeed;
    }

    public String getSeatHeating() {
        return SeatHeating;
    }

    public String getSim() {
        return Sim;
    }

    public String getPower() {
        return Power;
    }

    public String getInnerTmp() {
        return InnerTmp;
    }

    public String getExternalTmp() {
        return ExternalTmp;
    }

    public String getMileage() {
        return Mileage;
    }

    public String getDate() {
        return Date;
    }

    public String getTime() {
        return Time;
    }

    public String getSpeed() {
        return Speed;
    }

    public String getLatitude() {
        return Latitude;
    }

    public String getLongitude() {
        return Longitude;
    }

    public String getElevation() {
        return Elevation;
    }
}
